<!--{template header}-->

<!--{eval 
$icons = array(
	0 => '不用动作',
	1 => '<img src="image/poke/cyx.gif" />踩一下',
	2 => '<img src="image/poke/wgs.gif" />握个手',
	3 => '<img src="image/poke/wx.gif" />微笑',
	4 => '<img src="image/poke/jy.gif" />加油',
	5 => '<img src="image/poke/pmy.gif" />抛媚眼',
	6 => '<img src="image/poke/yb.gif" />拥抱',
	7 => '<img src="image/poke/fw.gif" />飞吻',
	8 => '<img src="image/poke/nyy.gif" />挠痒痒',
	9 => '<img src="image/poke/gyq.gif" />给一拳',
	10 => '<img src="image/poke/dyx.gif" />电一下',
	11 => '<img src="image/poke/yw.gif" />依偎',
	12 => '<img src="image/poke/ppjb.gif" />拍拍肩膀',
	13 => '<img src="image/poke/yyk.gif" />咬一口'
);
}-->

<!--{if $op == 'send' || $op == 'reply'}-->
<div id="$tospace[uid]" <!--{if !$_SGLOBAL[inajax]}-->class="inpage"<!--{/if}-->>
<!--{if $_SGLOBAL[inajax]}-->
<div class="popupmenu_border">
<h1>打招呼</h1>
<a href="javascript:hideMenu();" title="关闭" class="float_del">关闭</a>
<div class="popupmenu_inner">
<!--{/if}-->
<form method="post" id="pokeform_{$tospace[uid]}" name="pokeform_{$tospace[uid]}" action="cp.php?ac=poke&op=$op&uid=$tospace[uid]">
	<table cellspacing="0" cellpadding="3">
		<tr>
			<th width="52"><div class="avatar48"><a href="space.php?uid=$tospace[uid]"><img src="<!--{avatar($tospace[uid],small)}-->" alt="{$_SN[$tospace[uid]]}" width="48" height="48" /></div></th>
			<td>向 <strong>{$_SN[$tospace[uid]]}</strong> 打招呼：<br />
				<ul class="list2col" style="width:300px;">
					<!--{loop $icons $k $v}-->
					<li><input type="radio" name="iconid" id="poke_$k" value="{$k}" /><label for="poke_$k">{$v}</label></li>
					<!--{/loop}-->
				</ul>
				<input type="text" name="note" id="note" value="" size="16" class="t_input" onkeydown="ctrlEnter(event, 'pokesubmit_btn', 1);" style="width: 300px;" maxlength="25" />
				<p class="gray">(内容为可选，并且会覆盖之前的招呼，最多25个汉字)</p>
			</td>
		</tr>
		<tr>
			<th>&nbsp;</th>
			<td>
				<input type="hidden" name="refer" value="$_SGLOBAL[refer]">
				<input type="hidden" name="pokesubmit" value="true" />
				<!--{if $_SGLOBAL[inajax]}-->
				<input type="button" name="pokesubmit_btn" id="pokesubmit_btn" value="确定" class="submit" onclick="ajaxpost('pokeform_{$tospace[uid]}', '$tospace[uid]', 'poke_send')" />
				<!--{else}-->
				<input type="submit" name="pokesubmit_btn" id="pokesubmit_btn" value="确定" class="submit" />
				<!--{/if}-->
			</td>
	</table>
<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
</form>
<!--{if $_SGLOBAL[inajax]}--></div></div><!--{/if}-->
</div>

<!--{else}-->

<h2 class="title"><img src="image/icon/poke.gif">打招呼</h2>
<div class="tabs_header">
	<ul class="tabs">
		<li class="active"><a href="cp.php?ac=friend&op=request"><span>打招呼</span></a></li>
	</ul>
</div>

<div class="h_status">您可以回复招呼或者进行忽略<span class="pipe">|</span><a href="cp.php?ac=poke&op=ignore" id="a_poke" onclick="ajaxmenu(event, this.id, 1000, 'mypoke_all')">全部忽略</a></div>

<!--{if $list}-->
<div class="c_form" id="poke_ul">
	<table cellpadding="4" cellspacing="4" width="100%">
		<!--{loop $list $key $value}-->
		<tbody id="poke_$value[uid]">
		<tr>
			<td width="70">
				<div class="avatar48">
				<a href="space.php?uid=$value[uid]"><img src="<!--{avatar($value[uid],small)}-->" alt="{$_SN[$value[uid]]}" /></a>
				</div>
			</td>
			<td>
				<span style="font-size:14px">
				<a href="space.php?uid=$value[uid]">{$_SN[$value[uid]]}</a>：
				<!--{if $value[iconid]}-->{$icons[$value[iconid]]}<!--{else}-->打个招呼<!--{/if}-->
				<!--{if $value[note]}-->，并对您说：$value[note]<!--{/if}-->
				</span>
				<span class="time" style="padding:0 0 0 10px;"><!--{date('m-d H:i',$value[dateline],1)}--></span>
				<p style="padding-top:10px;">
				<a href="cp.php?ac=poke&op=reply&uid=$value[uid]" id="a_p_r_$value[uid]" onclick="ajaxmenu(event, this.id, 99999, '', -1)">打招呼</a><span class="pipe">|</span>
				<!--{if !$value['isfriend']}--><a href="cp.php?ac=friend&op=add&uid=$value[uid]" id="a_friend_$key" onclick="ajaxmenu(event, this.id, 99999, '', -1)">加为好友</a><span class="pipe">|</span><!--{/if}-->
				<a href="cp.php?ac=poke&op=ignore&uid=$value[uid]" id="a_p_i_$value[uid]" onclick="ajaxmenu(event, this.id, 1, 'mypoke')">忽略</a>
				</p>
			</td>
		</tr>
		</tbody>
		<!--{/loop}-->
	</table>
	<div class="page">$multi</div>
</div>

<!--{else}-->
<div class="c_form">
	还没有新招呼。
</div>
<!--{/if}-->

<script>
	function mypoke(id) {
		var liid = id.substr(6);
		$('poke_'+liid).style.display = "none";
	}
	function mypoke_all(id) {
		$('poke_ul').innerHTML = "忽略了全部的招呼";
	}
</script>

<!--{/if}-->

<!--{template footer}-->